import appKeyRepository from '@/repositories/appKey'

const getAppKeysResult = async (appKeyName) => {
  let searchFilter = {
    fieldName: 'appKey',
    operator: 'EQ',
    value: appKeyName
  }
  let searchFilters = []
  searchFilters.push(searchFilter)
  let params = {}
  params.searchFilters = searchFilters
  let result = await appKeyRepository.getAppKeys(params)
  return result.length > 0 ? result[0] : {}
}

export default {
  getAppKeysResult: getAppKeysResult
}
